package com.itheima.常用API.基本类型包装类;

public class intAndString {
    public static void main(String[] args) {
        int a1=20;
        String s1=a1+"";
        String s2=String.valueOf(a1);
        System.out.println("第一种方式int转换String:   "+s1);
        System.out.println("第二种方式int转换String:   "+s2);
        System.out.println(" - - - - - - - ");
        String s="1234";
        Integer i1=Integer.valueOf(s);
        int a2=i1.intValue();
        int a3=Integer.parseInt(s);
        System.out.println("第一种方式String转换int:   "+a2);
        System.out.println("第二种方式String转换int:   "+a2);
    }
}
